<template>
  <!-- 通用描述标签 -->
  <div v-text="_modelValue" class="code-desc-scrollbar" />
</template>

<script setup>
  import { computed } from "vue";

  const props = defineProps({
    modelValue: {
      type: [Number, String]
    },
    text: {
      type: [Number, String]
    }
  });

  //值数据
  const _modelValue = computed(() => {
    return props.text ? props.text : props.modelValue;
  });
</script>

<style scoped>
  /* 滑动显示文字 */
  .code-desc-scrollbar {
    padding-left: 5px;
    display: block;
    text-align: left;
    white-space: nowrap;
    overflow: auto;
    color: #606266;
    /* text-overflow: ellipsis; */
  }

  .code-desc-scrollbar::-webkit-scrollbar {
    display: none;
  }
</style>
